package com.usian.admin.feign;

import com.usian.model.article.pojos.ApArticle;
import com.usian.model.article.pojos.ApArticleConfig;
import com.usian.model.article.pojos.ApArticleContent;
import com.usian.model.article.pojos.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-article")
public interface ArticleFeign {

    @PostMapping("/api/v1/articleConfig/save")
    public ResponseResult saveArticleConfig(@RequestBody ApArticleConfig apArticleConfig);

    @PostMapping("/api/v1/articleContent/save")
    public ResponseResult saveArticleContent(@RequestBody ApArticleContent apArticleContent);

    @PostMapping("/api/v1/article/save")
    public ApArticle saveApArticle(@RequestBody ApArticle apArticle);

    @GetMapping("/apauthor/findById/{id}")
    public ApAuthor findById(@PathVariable Integer id);
}
